<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jq/jquery1.9/jquery-1.9.0.js"></script>
    <style>
        .d1{
            width:600px;
            height: 600px;
            border:1px solid red;
        }
        .d2{
            width:200px;
            height: 200px;
            border:1px solid green;
        }
    </style>
    <script>
        $(function(){
            $(".d1").mouseenter(function(){
                console.log(1);
            });
            $(".d1").mouseleave(function(){
                console.log(2);
            });
        });
    </script>
</head>
<body>
    <div class="d1">
        <p class="d2"></p>
    </div>
</body>
</html>